package com.wasion.pwportable.protocol.analyzer.indicator;

import com.wasion.pwportable.protocol.analyzer.AbstractAnalyzer;

/**
 * 
 * @ClassName: Cable_Data_RD_Analyzer
 * @Description: 3D. 电缆型故障指示器实时数据
 * @author 高意
 * @date 2014-9-10 下午5:11:46
 * 
 */
public class Cable_Data_RD_Analyzer extends AbstractAnalyzer {

	@Override
	public void dataAnalysis(String ackBS) {

		String data = ackBS.substring(DATABITSTART, DATABITSTART + 4);

		double phaseCurrent = getCurrentInverted(data);
		result.setPhaseCurrent(phaseCurrent);

		data = ackBS.substring(DATABITSTART + 4, DATABITSTART + 8);

		double temperature = getTemperature(data);
		result.setTemperature(temperature);

		data = ackBS.substring(DATABITSTART + 8, DATABITSTART + 12);

		double zeroCurrent = getCurrentInverted(data);
		result.setZeroCurrent(zeroCurrent);
	}
}
